<template>
  <div>
    <button @click="ADD_NUM(5)">+</button>
    {{ num }}
    <button @click="REDUCE_NUM(10)">-</button>
    {{ items }}
  </div>
</template>

<script>
import { mapState, mapMutations } from 'vuex'
export default {
  methods: {
    ...mapMutations(['ADD_NUM', 'REDUCE_NUM'])
  },
  created () {
    this.$store.dispatch('FETCH_ITEMS')
  },
  computed: {
    ...mapState(['num', 'items'])
  }
}
</script>

<style lang="scss" scoped>
</style>
